package com.ruoyi.project.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.FinBaseEntity;
import com.ruoyi.common.domainenum.FinSubjectDirectionType;
import com.ruoyi.common.domainenum.FinSubjectType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 科目余额对象 fin_subject_month
 * 
 * @author abel
 * @date 2024-10-15
 */
public class FinSubjectMonth extends FinBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId(type = IdType.AUTO)
    private Long id;

    private Long subjectParentId;

    private String subjectParentName;

    private String subjectParentCode;

    private Integer subjectLevel;
    /** 类型 */
    @Excel(name = "类型")
    private FinSubjectType subjectType;

    /** 借贷方向 */
    @Excel(name = "借贷方向")
    private FinSubjectDirectionType directionType;

    /** 科目id */
    @Excel(name = "科目id")
    private Long subjectId;

    /** 科目代码 */
    @Excel(name = "科目代码")
    private String subjectCode;

    /** 科目 */
    @Excel(name = "科目")
    private String subjectName;

    /** 期初金额 */
    @Excel(name = "期初借方金额")
    private BigDecimal beginJieValue;

    @Excel(name = "期初贷方金额")
    private BigDecimal beginDaiValue;

    /** 期末金额 */
    @Excel(name = "期末借方金额")
    private BigDecimal endJieValue;

    @Excel(name = "期末贷方金额")
    private BigDecimal endDaiValue;

    /** 年初金额 */
    @Excel(name = "年初金额")
    private BigDecimal beginYearValue;

    @Excel(name = "本期借方发生额")
    private BigDecimal monthJieValue;

    @Excel(name = "本期贷方发生额")
    private BigDecimal monthDaiValue;

    @Excel(name = "本年借方发生额")
    private BigDecimal yearJieValue;

    @Excel(name = "本年贷方发生额")
    private BigDecimal yearDaiValue;

    /**
     * 本期发生额  余额为借时，公式为，monthJieValue- monthDaiValue
     * 余额为贷时，公式为：monthDaiValue - monthJieValue
     * */
    @Excel(name = "本期发生额")
    private BigDecimal monthSumValue;

    /** 年份 */
    @Excel(name = "年份")
    private Integer yearValue;

    /** 月份 */
    @Excel(name = "月份")
    private Integer monthValue;

    /** 年份和月份 */
    @Excel(name = "年份和月份")
    private String yearAndMonth;

    /**
     * 过滤全0的数据
     */
    @TableField(exist = false)
    private Boolean hasGtZero;


    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public Integer getSubjectLevel() {
        return subjectLevel;
    }

    public void setSubjectLevel(Integer subjectLevel) {
        this.subjectLevel = subjectLevel;
    }

    public Boolean getHasGtZero() {
        return hasGtZero;
    }

    public void setHasGtZero(Boolean hasGtZero) {
        this.hasGtZero = hasGtZero;
    }

    public BigDecimal getMonthJieValue() {
        return monthJieValue;
    }

    public void setMonthJieValue(BigDecimal monthJieValue) {
        this.monthJieValue = monthJieValue;
    }

    public BigDecimal getMonthDaiValue() {
        return monthDaiValue;
    }

    public void setMonthDaiValue(BigDecimal monthDaiValue) {
        this.monthDaiValue = monthDaiValue;
    }

    public BigDecimal getYearJieValue() {
        return yearJieValue;
    }

    public void setYearJieValue(BigDecimal yearJieValue) {
        this.yearJieValue = yearJieValue;
    }

    public BigDecimal getYearDaiValue() {
        return yearDaiValue;
    }

    public void setYearDaiValue(BigDecimal yearDaiValue) {
        this.yearDaiValue = yearDaiValue;
    }

    public String getSubjectParentCode() {
        return subjectParentCode;
    }

    public void setSubjectParentCode(String subjectParentCode) {
        this.subjectParentCode = subjectParentCode;
    }

    public Long getSubjectParentId() {
        return subjectParentId;
    }

    public void setSubjectParentId(Long subjectParentId) {
        this.subjectParentId = subjectParentId;
    }

    public String getSubjectParentName() {
        return subjectParentName;
    }

    public void setSubjectParentName(String subjectParentName) {
        this.subjectParentName = subjectParentName;
    }

    public FinSubjectType getSubjectType() {
        return subjectType;
    }

    public void setSubjectType(FinSubjectType subjectType) {
        this.subjectType = subjectType;
    }

    public FinSubjectDirectionType getDirectionType() {
        return directionType;
    }

    public void setDirectionType(FinSubjectDirectionType directionType) {
        this.directionType = directionType;
    }

    public void setSubjectId(Long subjectId)
    {
        this.subjectId = subjectId;
    }

    public Long getSubjectId() 
    {
        return subjectId;
    }
    public void setSubjectCode(String subjectCode) 
    {
        this.subjectCode = subjectCode;
    }

    public String getSubjectCode() 
    {
        return subjectCode;
    }
    public void setSubjectName(String subjectName) 
    {
        this.subjectName = subjectName;
    }

    public String getSubjectName() 
    {
        return subjectName;
    }

    public BigDecimal getBeginJieValue() {
        return beginJieValue;
    }

    public void setBeginJieValue(BigDecimal beginJieValue) {
        this.beginJieValue = beginJieValue;
    }

    public BigDecimal getBeginDaiValue() {
        return beginDaiValue;
    }

    public void setBeginDaiValue(BigDecimal beginDaiValue) {
        this.beginDaiValue = beginDaiValue;
    }

    public BigDecimal getEndJieValue() {
        return endJieValue;
    }

    public void setEndJieValue(BigDecimal endJieValue) {
        this.endJieValue = endJieValue;
    }

    public BigDecimal getEndDaiValue() {
        return endDaiValue;
    }

    public void setEndDaiValue(BigDecimal endDaiValue) {
        this.endDaiValue = endDaiValue;
    }

    public void setBeginYearValue(BigDecimal beginYearValue)
    {
        this.beginYearValue = beginYearValue;
    }

    public BigDecimal getBeginYearValue() 
    {
        return beginYearValue;
    }
    public void setMonthSumValue(BigDecimal monthSumValue)
    {
        this.monthSumValue = monthSumValue;
    }

    public BigDecimal getMonthSumValue()
    {
        return monthSumValue;
    }

    public Integer getYearValue() {
        return yearValue;
    }

    public void setYearValue(Integer yearValue) {
        this.yearValue = yearValue;
    }

    public Integer getMonthValue() {
        return monthValue;
    }

    public void setMonthValue(Integer monthValue) {
        this.monthValue = monthValue;
    }

    public void setYearAndMonth(String yearAndMonth)
    {
        this.yearAndMonth = yearAndMonth;
    }

    public String getYearAndMonth() 
    {
        return yearAndMonth;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("subjectType", getSubjectType())
            .append("directionType", getDirectionType())
            .append("subjectId", getSubjectId())
            .append("subjectCode", getSubjectCode())
            .append("subjectName", getSubjectName())
            .append("beginYearValue", getBeginYearValue())
            .append("monthSumValue", getMonthSumValue())
            .append("yearValue", getYearValue())
            .append("monthValue", getMonthValue())
            .append("yearAndMonth", getYearAndMonth())
            .append("packageId", getPackageId())
            .append("createId", getCreateId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateId", getUpdateId())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
